using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace DataModels.Models
{
    public partial class OtherSystemsFacilityDetail : ModelBase
    {
        #region Constants
        /// <summary>
        /// Direct Service Delivery
        /// </summary>
        public const string DSD = "DSD";

        /// <summary>
        /// Technical Assistance Only
        /// </summary>
        public const string TA_ONLY = "TA-Only";

        /// <summary>
        /// Neither site
        /// </summary>
        public const string NEITHER = "NA";

        /// <summary>
        /// Those cell values evaluated to be FALSE will not be written at all.
        /// This means there will be an empty cell
        /// </summary>
        public const string SKIP_FALSE_VALUE = "SKIP_FALSE_VALUE";
        public const string RCH_FACILITY = "RCH_FACILITY";

        public const string HTC_SERVICE_TYPE = "HTC_SERVICE";
        public const string Care_SERVICE_TYPE = "CARE_SERVICE";
        public const string FN_SERVICE_TYPE = "FN_SERVICE";
        public const string TB_HIV_SERVICE_TYPE = "TB_HIV_SERVICE";
        public const string TX_SERVICE_TYPE = "TX_SERVICE";
        public const string PMTCT_SERVICE_TYPE = "PMTCT_SERVICE";
        public const string HRH_SERVICE_TYPE = "HRH_SERVICE";
        public const string LAB_SERVICE_TYPE = "LAB_SERVICE";
        public const string VMMC_SERVICE_TYPE = "VMMC_SERVICE";
        public const string GPY_SERVICE_TYPE = "GPY_SERVICE";
        public const string KP_SERVICE_TYPE = "KP_SERVICE";
        public const string OVC_SERVICE_TYPE = "OVC_SERVICE";
        public const string FPINT_SERVICE_TYPE = "FPINT_SERVICE";

        public const string DSD_HTC = "DSD_HTC";
        public const string DSD_TREATMENT = "DSD_TREATMENT";
        public const string DSD_CARE_AND_SUPPORT = "DSD_CARE_AND_SUPPORT";
        public const string DSD_FOOD_AND_NUTRITION = "DSD_FOOD_AND_NUTRITION";
        public const string DSD_PMTCT = "DSD_PMTCT";
        public const string DSD_TB_HIV = "DSD_TB_HIV";
        public const string DSD_VMMC = "DSD_VMMC";
        public const string DSD_KEY_POP_PREVENTION = "DSD_KEY_POP_PREVENTION";
        public const string DSD_PHDP_FAMILY_PLANNING = "DSD_PHDP_FAMILY_PLANNING";
        public const string DSD_LAB = "DSD_LAB";

        public const string TA_HTC = "TA_HTC";
        public const string TA_TREATMENT = "TA_TREATMENT";
        public const string TA_CARE_AND_SUPPORT = "TA_CARE_AND_SUPPORT";
        public const string TA_FOOD_AND_NUTRITION = "TA_FOOD_AND_NUTRITION";
        public const string TA_PMTCT = "TA_PMTCT";
        public const string TA_TB_HIV = "TA_TB_HIV";
        public const string TA_VMMC = "TA_VMMC";
        public const string TA_KEY_POP_PREVENTION = "TA_KEY_POP_PREVENTION";
        public const string TA_PHDP_FAMILY_PLANNING = "TA_PHDP_FAMILY_PLANNING";
        public const string TA_LAB = "TA_LAB";

        public const int CALCULATING_METHOD_INVALID = 1000;
        public const int CALCULATING_METHOD_DEFAULT = 2000;
        public const int CALCULATING_METHOD_COP14 = 2014;
        #endregion

        [Key, Column(Order = 0)]
        public int SystemId { get; set; }

        [Key, Column(Order = 1)]
        [Required]
        [StringLength(50)]
        public string InternalFacilityCode { get; set; }

        [Required]
        [StringLength(50)]
        public string FacilityCode { get; set; }

        private string _FacilityName;
        [Required]
        [StringLength(255)]
        public string FacilityName 
        { 
            get { return _FacilityName;}
            set
            {
                _FacilityName = value;
                OnPropertyChanged("FacilityName");
            }
        }

        private string _DistrictName;
        [Required]
        [StringLength(255)]
        public string DistrictName 
        {
            get { return _DistrictName; }
            set
            {
                _DistrictName = value;
                OnPropertyChanged("DistrictName");
            }
        }

        private string _RegionName;
        [Required]
        [StringLength(255)]
        public string RegionName 
        {
            get { return _RegionName; }
            set
            {
                _RegionName = value;
                OnPropertyChanged("RegionName");
            }
        }
        
        [ForeignKey("InternalFacilityCode")]
        public virtual Facility Facility { get; set; }
        
        [ForeignKey("SystemId")]
        public virtual OtherSystem OtherSystem { get; set; }

        #region Service Types
        private string _HTC_ServiceType;
        /// <summary>
        /// HTC_: HIV Testing and Counseling Service Type
        /// </summary>
        [StringLength(10)]
        public string HTC_ServiceType
        {
            get { return _HTC_ServiceType; }
            set
            {
                _HTC_ServiceType = value;
                OnPropertyChanged("HTC_ServiceType");
            }
        }

        private string _Care_ServiceType;
        /// <summary>
        /// Care_: Care and Support Service Type
        /// </summary>
        [StringLength(10)]
        public string Care_ServiceType
        {
            get { return _Care_ServiceType; }
            set
            {
                _Care_ServiceType = value;
                OnPropertyChanged("Care_ServiceType");
            }
        }

        private string _FN_ServiceType;
        /// <summary>
        /// FN_: Food and Nutrition Service Type
        /// </summary>
        [StringLength(10)]
        public string FN_ServiceType
        {
            get { return _FN_ServiceType; }
            set
            {
                _FN_ServiceType = value;
                OnPropertyChanged("FN_ServiceType");
            }
        }

        private string _TB_HIV_ServiceType;
        /// <summary>
        /// TB/HIV Service Type
        /// </summary>
        [StringLength(10)]
        public string TB_HIV_ServiceType
        {
            get { return _TB_HIV_ServiceType; }
            set
            {
                _TB_HIV_ServiceType = value;
                OnPropertyChanged("TB_HIV_ServiceType");
            }
        }

        private string _TX_ServiceType;
        /// <summary>
        /// TX_: Treatment
        /// </summary>
        [StringLength(10)]
        public string TX_ServiceType
        {
            get { return _TX_ServiceType; }
            set
            {
                _TX_ServiceType = value;
                OnPropertyChanged("TX_ServiceType");
            }
        }

        private string _PMTCT_ServiceType;
        /// <summary>
        /// PMTCT_: Prevention of Mother to Child Transmission Service Type
        /// </summary>
        [StringLength(10)]
        public string PMTCT_ServiceType
        {
            get { return _PMTCT_ServiceType; }
            set
            {
                _PMTCT_ServiceType = value;
                OnPropertyChanged("PMTCT_ServiceType");
            }
        }

        private string _HRH_ServiceType;
        /// <summary>
        /// HRH_: Human Resources for Health Service Type
        /// </summary>
        [StringLength(10)]
        public string HRH_ServiceType
        {
            get { return _HRH_ServiceType; }
            set
            {
                _HRH_ServiceType = value;
                OnPropertyChanged("HRH_ServiceType");
            }
        }

        private string _LAB_ServiceType;
        /// <summary>
        /// LAB_: Laboratory Service Type
        /// </summary>
        [StringLength(10)]
        public string LAB_ServiceType
        {
            get { return _LAB_ServiceType; }
            set
            {
                _LAB_ServiceType = value;
                OnPropertyChanged("LAB_ServiceType");
            }
        }

        private string _VMMC_ServiceType;
        /// <summary>
        /// VMMC_: Voluntary Medical Male Circumcision Service Type
        /// </summary>
        [StringLength(10)]
        public string VMMC_ServiceType
        {
            get { return _VMMC_ServiceType; }
            set
            {
                _VMMC_ServiceType = value;
                OnPropertyChanged("VMMC_ServiceType");
            }
        }

        private string _GPY_ServiceType;
        /// <summary>
        /// GPY_: General Population and Youth Service Type
        /// </summary>
        [StringLength(10)]
        public string GPY_ServiceType
        {
            get { return _GPY_ServiceType; }
            set
            {
                _GPY_ServiceType = value;
                OnPropertyChanged("GPY_ServiceType");
            }
        }

        private string _KP_ServiceType;
        /// <summary>
        /// KP_: Key Populations
        /// </summary>
        [StringLength(10)]
        public string KP_ServiceType
        {
            get { return _KP_ServiceType; }
            set
            {
                _KP_ServiceType = value;
                OnPropertyChanged("KP_ServiceType");
            }
        }

        private string _OVC_ServiceType;
        /// <summary>
        /// OVC_: Orphans and Vulnerable Children Service Type
        /// </summary>
        [StringLength(10)]
        public string OVC_ServiceType
        {
            get { return _OVC_ServiceType; }
            set
            {
                _OVC_ServiceType = value;
                OnPropertyChanged("OVC_ServiceType");
            }
        }

        private string _FPINT_ServiceType;
        /// <summary>
        /// FPINT_: Family Planning Integration Service Type
        /// </summary>
        [StringLength(10)]
        public string FPINT_ServiceType
        {
            get { return _FPINT_ServiceType; }
            set
            {
                _FPINT_ServiceType = value;
                OnPropertyChanged("FPINT_ServiceType");
            }
        }
        #endregion
    }
}
